package com.xiaoxiaoxt.xiaoxiaoxtdao.mapper;

import com.xiaoxiaoxt.xiaoxiaoxtdao.entity.Trade;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface TradeMapper extends Mapper<Trade> {

//    @Select("select * from trades where trade_no = #{trade_no,jdbcType=VARCHAR} LIMIT 1")
    Trade selectByTradeNo(@Param("trade_no") String tradeNo);

    @Select("select * from trades where consumer_mid = #{consumerMid} order by ")
    ArrayList<Trade> selectConsumeListByConsumerMid(@Param("consumerMid") Integer consumerMid);

    List<Map> selectTest(Integer mid);
}